In [1]:
%matplotlib inline

# OPTIONAL: Load the "autoreload" extension so that code can change
%load_ext autoreload

# OPTIONAL: always reload modules so that as you change code in src, it gets loaded
%autoreload 2

Data

In [2]:
from pvlib.iotools import read_epw
weather, meta = read_epw('../data/processed/meteo.epw')
weather.head()
Out[2]:
year month day hour minute data_source_unct temp_air temp_dew relative_humidity atmospheric_pressure ... ceiling_height present_weather_observation present_weather_codes precipitable_water aerosol_optical_depth snow_depth days_since_last_snowfall albedo liquid_precipitation_depth liquid_precipitation_quantity
2005-01-01 00:00:00+01:00 2005 1 1 1 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 7.1 1.5 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.732 0.0 99.0
2005-01-01 01:00:00+01:00 2005 1 1 2 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.7 1.5 69 98414 ... 99999 9 999999999 10 0.118 18 0 0.717 0.0 99.0
2005-01-01 02:00:00+01:00 2005 1 1 3 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.4 1.0 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.702 0.0 99.0
2005-01-01 03:00:00+01:00 2005 1 1 4 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.2 0.8 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.689 0.0 99.0
2005-01-01 04:00:00+01:00 2005 1 1 5 60 *?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*? 6.0 0.5 68 98414 ... 99999 9 999999999 10 0.118 18 0 0.676 0.0 99.0

5 rows × 35 columns

In [3]:
import pandas as pd

summary = pd.read_csv('../data/processed/summary.csv')
summary.head()
Out[3]:
Zonenr Rel_BAL BAL_ENERGY DQAIRdt QHEAT QCOOL QINF QVENT QCOUPL QTRANS QGAININT QWGAIN QSOLGAIN QSOLAIR
0 1 0.0 1.548000e-08 234.9 7300.0 0.0 0.0 0.0 -436900.0 429900.0 0.0 0.0 0.0 0.0
1 2 0.0 6.835000e-09 113.0 29990000.0 0.0 -38920000.0 0.0 8200000.0 -205300.0 0.0 0.0 939900.0 0.0
2 3 0.0 -7.202000e-09 1212.0 58960.0 0.0 -1469000.0 0.0 -813700.0 -5457000.0 1215000.0 0.0 6467000.0 0.0
3 4 0.0 -4.229000e-08 2167.0 20150.0 0.0 -1685000.0 0.0 -5523000.0 -9769000.0 4704000.0 0.0 12250000.0 0.0
4 5 0.0 6.735000e-09 1822.0 47730.0 0.0 -1008000.0 0.0 -2289000.0 -4017000.0 2227000.0 0.0 5041000.0 0.0
In [4]:
energy_zones = pd.read_csv('../data/processed/energy_zones.csv')
energy_zones.head()
Out[4]:
TIME REL_BAL_ENERGY 1_B4_QBAL 1_B4_DQAIRdT 1_B4_QHEAT 1_B4_QCOOL 1_B4_QINF 1_B4_QVENT 1B4_QCOUP 1_B4_QTRANS ... 5_B4_QHEAT 5_B4_QCOOL 5_B4_QINF 5_B4_QVENT 5B4_QCOUP 5_B4_QTRANS 5_B4_QGINT 5_B4_QWGAIN 5_B4_QSOL 5_B4_QSOLAIR
0 0 0.0 2.523000e-11 -8.356 0.0 0.0 0.0 0.0 -41.42 33.07 ... 0.0 0.0 -83.14 0.0 62.85 -554.3 374.9 0.0 -1.070000e-12 0.0
1 1 0.0 1.478000e-11 -2.190 0.0 0.0 0.0 0.0 -42.78 40.59 ... 0.0 0.0 -56.99 0.0 97.38 -387.7 374.9 0.0 -2.884000e-13 0.0
2 2 0.0 3.435000e-12 2.555 0.0 0.0 0.0 0.0 -27.60 30.15 ... 0.0 0.0 -36.10 0.0 82.31 -395.9 374.9 0.0 3.505000e-12 0.0
3 3 0.0 1.552000e-11 -4.190 0.0 0.0 0.0 0.0 -29.01 24.82 ... 0.0 0.0 -37.67 0.0 72.04 -414.2 374.9 0.0 -1.149000e-12 0.0
4 4 0.0 5.542000e-13 -1.234 0.0 0.0 0.0 0.0 -27.87 26.64 ... 0.0 0.0 -38.77 0.0 64.68 -407.8 374.9 0.0 -2.478000e-12 0.0

5 rows × 62 columns

In [5]:
cultural_e = pd.read_csv('../data/processed/cultural-e.csv')
cultural_e.head()
Out[5]:
TIME SQHEAT_1 SQCOOL_1 TAIR_corridor TOP_corridor TAIR_bathroom TOP_bathroom TAIR_bed1_single TOP_bed1_single TAIR_livingRoom ... label.53 label.54 label.55 label.56 label.57 label.58 label.59 label.60 label.61 label.62
0 0 9361.516515 0.0 21.885728 21.912881 21.0 20.771892 21.931716 21.859126 22.939062 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1 1 9438.759632 0.0 21.808748 21.856483 21.0 20.766469 21.934159 21.823100 22.640732 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 2 6743.589743 0.0 21.750157 21.808868 21.0 20.769698 21.766984 21.725055 22.612469 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 3 4457.281870 0.0 21.752182 21.795807 21.0 20.773711 21.789886 21.736173 22.605993 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 4 4636.604799 0.0 21.743100 21.779023 21.0 20.770586 21.776703 21.706037 22.575662 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

5 rows × 101 columns

Graphs

In [6]:
from src.visualization import visualize as viz

Climate

In [7]:
viz.air_temperature(weather)
2021-02-15T09:46:01.120475 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [8]:
viz.relative_humidity(weather)
2021-02-15T09:46:02.793959 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [9]:
viz.horizontal_irradiance(weather)
2021-02-15T09:46:04.553031 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/

Energy

In [10]:
viz.heating_loads(cultural_e)
2021-02-15T09:46:05.982325 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [11]:
viz.cooling_loads(cultural_e)
2021-02-15T09:46:07.049737 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [12]:
viz.energy_balance(summary)
2021-02-15T09:46:08.091897 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [13]:
for zone in ['1', '2', '3', '4', '5']:
    viz.zone_energy_balance(energy_zones, zone)
2021-02-15T09:46:10.329012 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-15T09:46:12.756438 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-15T09:46:16.996122 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-15T09:46:20.971139 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
2021-02-15T09:46:23.738272 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [14]:
viz.monthly_consumption(cultural_e)
2021-02-15T09:46:28.115372 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/

Comfort

In [15]:
viz.psychrochart(cultural_e.sample(n=100), 'bed1_single').get_figure()
Out[15]:
2021-02-15T09:46:30.001924 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [16]:
viz.airt_heatmap(cultural_e, 'bed1_single')
2021-02-15T09:46:35.832461 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [17]:
viz.shd_heatmap(cultural_e)
2021-02-15T09:46:41.105534 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [18]:
viz.win_heatmap(cultural_e)
2021-02-15T09:46:45.330423 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [19]:
viz.iaq_co2(cultural_e, ['LR'], ['BR1', 'BR2'])
2021-02-15T09:46:48.126135 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [20]:
viz.relh(cultural_e, ['RELHUM_livingRoom', 'RELHUM_bed1_single','RELHUM_bed2_double'], ['SCH_PER_LR', 'SCH_PER_BR1', 'SCH_PER_BR2'])
2021-02-15T09:46:48.994792 image/svg+xml Matplotlib v3.3.3, https://matplotlib.org/
In [ ]: